<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<script>
var arr = ["a", "b", "c"]
//arr.push('d'); //入栈, 相当于在数组的末尾添加了元素.   arr[arr.length]=ele
//arr.push("e", "f");
//console.log(arr);
//arr.pop();  // 出栈. 把数组的最后一个元素删除. 返回删除的这个元素
//arr.pop();
//var s = arr.pop();
//console.log(s);
//console.log(arr);

/*while(arr.length > 0){
 arr.pop();
 }*/
for(var i = 0, len = arr.length; i < len; i++){
    arr.pop();
}
console.log(arr);
</script>
</body>
</html>